#pragma once
#include "TesConfig.h"
#include "TesLexLocation.h"


inline void TesError( const TesConfig & config, const tstring & errorType, const tstring & message, const TesLexLocation & location )
{
	tstringstream completeMessage;
	completeMessage << errorType << " " << location.ToString() << ": " << message << endl;
	TesErrorHandler errorHandler = config.ErrorHandler;
	errorHandler( completeMessage.str() );
}